home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Space & Astronomy
/
Space and Astronomy (October 1993).iso
/
mac
/
VIEWERS
/
AMIGA
/
GIFMACHN.LZH
/
README.RLP
< prev
next >
Wrap
Text File
|
1991-07-01
|
4KB
|
106 lines
GIFMachine -- GIF to SHAM conversion program by Christopher Wichura (2.0 only)
GIFM13 -- Modified to run under DOS 1.3, with arp.library.
I wanted to use Christopher Wichura's GIFMachine, but I do not have access
to DOS 2.0. So, I hacked up his source code...
Wichura has given me permission to distribute these changes in the form of
Lattice DIFF files. To construct a full set of my modifed source code,
you will need Wichura's original files (GIFMAC.LZH on Compu$erve).
Robert L. Pyron, 01July91
BIX: rpyron
-----------------------------------------------------------------------------
This archive includes:
GIFMachine.docs Wichura's doc file
GIFMachine original version, runs under 2.0
GIFM13 modified version, runs under 1.3 with arp.library
GIFM13.diff Lattice DIFF files, concatenated (see below)
README.RLP this file
UnDiff my undiff program
UnDIff.c source for undiff
rlpsrc/ my subdirectory for modified source files
ARPsvR.lib S. Vigna's ARPsv.lib, compiled with register args
iffw.c Electronic Arts source (public domain)
rlpsrc/iff/ Electronic Arts source (public domain)
compiler.h, gio.h, iff.h, ilbm.h
-----------------------------------------------------------------------------
NOT INCLUDED in this archive:
Sources/ Wichura's original source code
24to12.c, doflip.c, doimage.c, extensions.c, GIFMachine.h,
giftosham.c, lmkfile, main.c, mymem.c, myprintf.c, rgbdiff.c,
startup.a, stripborder.c, version.o, warncli.c, writeiff.c, xcomp.c
-----------------------------------------------------------------------------
How to create a copy of my modified source code:
1. Create subdirectory "sources".
2. Copy Wichura's original files into both "sources" and "rlpsrc".
3. Run the undiff program:
UnDiff < GIFM13.diff
-----------------------------------------------------------------------------
All my changes (except in "lmkfile") are marked with "#ifdef RLP". The most
extensive changes were in main.c and GIFMachine.h, along with a large
addition to writeiff.c, and some minor changes to other files.
1. I use the ARP library.
I am using Sebastiano Vigna's startup code. This needs to be
reworked some for more compatibility of argument handling and
of workbench support.
Full source for S. Vigna's startup code can be found in an archive
known (on BIX, at least) as LATARPSV11.LZH. I am including only
the file ARPsvR.lib, which is Vigna's code compiled with register
arguments.
2. I don't have IFFPARSE (is this part of 2.0?), so I put together
a minimal set to cover the functions that are used in Wichura's
code. They call functions in Electronic Arts' IFFW.C. My functions
are only a hack, and should not be used as the basis of any
implementation of IFFPARSE.
I am including all the relevant IFF source in the subdirectory
"iff". This is public domain from Electronic Arts.
3. The GetValue() and PutValue() macros did not work correctly, at
least using Lattice 5.05. These macros referenced pointers to
RGB structures, and cast them into pointers to WORD. The problem
was that the RGB structure is three bytes long, and an array of
them is packed... I added a pad field for alignment.
If one wanted to be clever, either addr or addr+1 is on a word
boundary, and fits entirely within the RGB structure. This could
be handled easily with a macro.
Drawbacks:
-- Too "clever"; a potential maintenance problem.
-- Might make the program noticeable slower.
-- It's bound to drive somebody up the wall.
Advantages:
-- Could save a considerable amount of memory on large pics.
-- It's bound to drive somebody up the wall.
4. rgbdiff.c used floating-point math to scale some byte values.
Since this only happens at program initialization, and this is
the only spot that uses FP, I changed the code to use integer
multiplication and bit shifts. The amount of time saved is
minuscule, but this means we have one less library to worry about.
5. I am using the object file "version.o" that Wichura supplied with
his code. I could write a program to update this at every compile,
but for now you are stuck with the same version number.
6. What the heck is a "boustrophedonic Floyd-Steinberg error diffusion
algorithm"? And how is it pronounced?